<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<div class="page_title">
	<s:if test="%{id == null}">
		Add new host
	</s:if>
	<s:else>
		Edit host '<s:property value="host.name"/>
	</s:else>
</div>

<div class="smallForm">
	<s:actionerror/>
	<s:actionmessage/>

	<s:form method="post" action="saveHost">
		<s:hidden name="host.id"/>
		<s:textfield cssClass="txt" name="host.name" label="Host Name"/>
		<s:component template="controlheader.ftl"/>
			<table width="100%">
				<tr>
					<td align="left">
						<s:submit action="testHost" theme="simple" cssClass="btn" value="%{'test'}" />
					</td>
					<td align="right">
						<s:submit theme="simple" cssClass="btn" value="%{'test and save'}" />
						<button class="btn" onclick="document.location='<s:url namespace="/admin" action="listHosts"/>';return false;">cancel</button>
					</td>
				</tr>
			</table>
		<s:component template="controlfooter.ftl"/>
	</s:form>
</div>
